<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>
	<button>1</button>
	<button onclick="fn2()">2</button>
	<button onclick="fn3(event)">3</button>
	<button onclick="fn4()">4</button>
	<button onclick="box.fn5()">5</button>
	<button onclick="fn6()">6</button>
</body>
<script>
	const btns = document.querySelectorAll("button");
	btns[0].onclick = function(){
		console.log(this);// button
	};
	const fn2 = function(){
		console.log(this);//window
	}
	const fn3 = function(event){
		console.log(this,event.target);// window
	}
	
	const fn4 = function(){
		"use strict";
		console.log(this);// undefined
	}
	
	class Box {
		fn5(){
			console.log(this);
		}
	};
	const box = new Box();// box.fn5();// box
	const fn6 = box.fn5;// undefined
</script>
</html>